public class test {
    public static double[] Gold(double[] numbers) {
        double min = Double.MAX_VALUE;
        double[] nums = null;
        for (int i = 0; i < numbers.length - 1; i++) {
            for (int j = i + 1; j < numbers.length; j++) {
                double temp = numbers[i] / numbers[j];
                double ret = Math.abs(temp - 0.618);
                if (ret < min) {
                    min = ret;
                    nums = new double[]{numbers[i], numbers[j]};
                }
            }
        }
        return nums;
    }

    public static void main(String[] args) {
        double[] numbers = new double[args.length];
        for (int i = 0; i < args.length; i++) {
            numbers[i] = Double.parseDouble(args[i]);
        }
        double[] ret = Gold(numbers);
        if (ret != null) {
            System.out.println("能找到 分别是：" + ret[0] + "和 " + ret[1]);
        } else {
            System.out.println("找不到");
        }
    }
}
